package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
public class Employee extends BaseDomain{
    public static final int NORMAL = 0;
    public static final int QUIT = 1;

    private String username;
    private String realName;
    private String password;
    private String tel;
    private String email;
    private Department department;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime;
    private int state = Employee.NORMAL;
    private boolean admin;

    //下面是多对多的关系列表
    private List<Role> roles = new ArrayList<>();
}
